/**
 * 
 */
package com.rrd.dw.mr.text;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.MultipleOutputs;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Node;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.rrd.dw.utils.HadoopUtils;

/**
 * @author xiexihao
 *
 */
public class VerifyAnalysisReportXMLParser extends Configured implements Tool {
	private static final String STR_FILED_SPLIT_FLAG = "\001";
	
	private static final String STR_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	private static final String STR_TARGET_POS_BASIC_FIRST = "firstbasic";	//首贷基本表
	private static final String STR_TARGET_POS_BASIC_RENEWAL = "renewalbasic";	//续贷基本表
	private static final String STR_TARGET_POS_LOAN_APP = "loanapp";
	private static final String STR_TARGET_POS_TRAFFIC_ANALYSIS = "trafficanalysis";
	private static final String STR_TARGET_POS_TAG_PHONE_ANALYSIS = "tagphoneanalysis";
	private static final String STR_TARGET_POS_ANTI_FRAUD_MODELS = "antifraudmodels";
	private static final String STR_TARGET_POS_ONE_MONTH_CALL_INFO = "onemonthcallinfo";
	private static final String STR_TARGET_POS_THREE_MONTH_CALL_INFO = "threemonthcallinfo";
	private static final String STR_TARGET_POS_REGISTER_PHONE_LIST = "registerphonelist";
	private static final String STR_TARGET_POS_ZHIMA_CREDIT = "zhimacredit";
	private static final String STR_TARGET_POS_ZHIMA_CREDIT_EXTEND = "zhimacreditextend";
	
	protected static Logger log = LoggerFactory.getLogger(VerifyAnalysisReportXMLParser.class);
	
	private static SimpleDateFormat dateFormatter = null;
	
	static {
		dateFormatter = new SimpleDateFormat(STR_DATE_FORMAT);
	}

	public static class AnalysisReportMapper extends Mapper<LongWritable, Text, Text, Text> {
		private Text key = null;
    	private Text value = null;
    	
    	private Document tmpDoc;
    	private Node tmpNode = null;
    	
    	protected void setup(Context context) {
    		key = new Text();
    		value = new Text();
    	}
		
    	protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
			String[] columns = value.toString().split(STR_FILED_SPLIT_FLAG, -1);
			String id = columns[0];
			String loan_id = columns[1];
			String user_key = columns[2];
			String xml = columns[3];
			String is_retry = columns[4];
			String ra_report_id = columns[5];
			String update_time = columns[6];
			String create_time = columns[7];
			String version = columns[8];
			String loan_key = columns[9];
			
			try {
				tmpDoc = DocumentHelper.parseText(xml);
			} catch (DocumentException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			if(tmpDoc == null)
				return;
			
			StringBuffer sb = new StringBuffer();
			
			
			/*************续贷基本表***************/
			this.key.set(STR_TARGET_POS_BASIC_RENEWAL);
			sb.delete(0, sb.length());
			
			sb.append(id).append(STR_FILED_SPLIT_FLAG);
			sb.append(loan_id).append(STR_FILED_SPLIT_FLAG);
			sb.append(user_key).append(STR_FILED_SPLIT_FLAG);
			sb.append(ra_report_id).append(STR_FILED_SPLIT_FLAG);
			sb.append(is_retry).append(STR_FILED_SPLIT_FLAG);
			
			sb.append(parseRenewalBasic());
			
			sb.append(update_time).append(STR_FILED_SPLIT_FLAG);
			sb.append(create_time).append(STR_FILED_SPLIT_FLAG);
			sb.append(version).append(STR_FILED_SPLIT_FLAG);
			sb.append(loan_key);
			
			this.value.set(sb.toString());
			context.write(this.key, this.value);
			
			
			/*************首贷基本表***************/
			this.key.set(STR_TARGET_POS_BASIC_FIRST);
			sb.delete(0, sb.length());
			
			sb.append(id).append(STR_FILED_SPLIT_FLAG);
			sb.append(loan_id).append(STR_FILED_SPLIT_FLAG);
			sb.append(user_key).append(STR_FILED_SPLIT_FLAG);
			sb.append(ra_report_id).append(STR_FILED_SPLIT_FLAG);
			sb.append(is_retry).append(STR_FILED_SPLIT_FLAG);
			
			sb.append(parseFirstBasic());
			
			sb.append(update_time).append(STR_FILED_SPLIT_FLAG);
			sb.append(create_time).append(STR_FILED_SPLIT_FLAG);
			sb.append(version).append(STR_FILED_SPLIT_FLAG);
			sb.append(loan_key);
			
			this.value.set(sb.toString());
			context.write(this.key, this.value);
			
			/*************首续贷共用表***************/
			parseTrafficAnalysis(context, id, loan_id, loan_key);
			parseTagPhoneAnalysis(context, id, loan_id, loan_key);
			parseLoanApp(context, id, loan_id, loan_key);
			parseOneMonthCallInfo(context, id, loan_id, loan_key);
			parseThreeMonthCallInfo(context, id, loan_id, loan_key);
			parseAntiFraudModels(context, id, loan_id, loan_key);
			parseRegisterPhoneList(context, id, loan_id, loan_key);
			parseZhimaCredit(context, id, loan_id, loan_key);
			
			tmpDoc = null;
		}
    	
    	private String parseRenewalBasic() throws IOException, InterruptedException {
    		StringBuffer sb = new StringBuffer();
    		
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_name_id_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_salary")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_company_address_pinpoint")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_company_name_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_living_address_pinpoint")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_bank_four_elements")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_face_plus_plus_alive")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_confidence")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_3")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_4")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_5")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/mask_confidence")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/screen_replay_confidence")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/mask_threshold")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/synthetic_face_confidence")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/synthetic_face_threshold")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/screen_replay_threshold")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/face_replaced")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_front/edited")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_front/photocopy")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_front/screen")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_front/temporary_id_photo")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_back/edited")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_back/photocopy")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_back/screen")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_legality_back/temporary_id_photo")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_phone_id_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_1km_company_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_3km_company_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_5km_company_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_1km_living_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_3km_living_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_5km_living_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/distance_living_company_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/gender")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/age")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_number_six_prefix")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_number_location")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_in_use_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_package_type")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_balance")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/check_consecutive_phone_register")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/position")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/profession")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/company_name")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/company_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/salary")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/living_address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/living_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/check_living_company_city_same")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/os_platform")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location_check")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/marriage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/amount")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/duration")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/latitude")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/longitude")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/loan_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/loan_time_slot")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/ip")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location_code")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/channel")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/device")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/jail_broken")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/is_copy_calculator")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_card_info/id_no")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_card_info/nation")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_card_info/valid")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_card_info/issue")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_card_info/address")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/channel_code")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/qualified_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/reason")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/last_reject_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/last_apply_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/max_overdue_days")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/reason")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/last_reject_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/user_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/reason")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/last_reject_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/user_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/reason")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/last_reject_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/phone_number_all_need_repay_amount")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/current_active_loan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_current_active_loan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_current_active_loan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_current_active_loan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/his_od_max")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_his_od_max")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_his_od_max")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_his_od_max")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/current_verify_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_current_verify_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_current_verify_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_current_verify_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/his_rejection_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_his_rejection_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_his_rejection_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_his_rejection_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/finishedloan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/paydayloan_finishedloan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/thread_finishedloan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_group_lend_request_info/renrendai_finishedloan_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/check_id_black")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/id_black_info_list")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/check_register_phone_black")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/check_reserved_phone_black")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/check_emergency_contact_black")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/contact_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/outcoming_call_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/incoming_call_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/nearly100_outcoming_call_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/nearly100_incoming_call_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/month_call_black_hit_count")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/rule_id_by_tongdun")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tongdun/final_score")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tongdun/final_decision")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/external_blacklist_info/is_external_blacklist")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/external_blacklist_info/is_same_phone_external_blacklist")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/external_blacklist_info/overdue_days_external_blacklist")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/verify_code")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/score")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/risk_code")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/hit")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tianji_xigua/decision_score")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tianji_xigua/hit")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_credit_score")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_credit_watch/is_matched")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_num")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_living_city_call_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_idnum_city_call_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/dawn_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/day_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/night_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/hit_gamble")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/hit_drug")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_dai")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_daiban")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_zhongjie")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_pian")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_cui")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_jieshao")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_daishua")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_pos")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_dubo")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_dupin")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_jinsha")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_aomen")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/phone_book_sensitive_words_info/has_yangka")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/nearly100_contact_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/three_month_contact_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/register_phone_call_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/reserved_phone_call_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/outbound_call_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/macao_call_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_call_110")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_call_120")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/nearly100_incoming_call_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_three_day_no_call")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_seven_day_no_call")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_fourteen_day_no_call")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_emergency_contact_not_keep_in_touch")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/incoming_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/incoming_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/outcoming_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/outcoming_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_incoming_info/call_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_incoming_info/phone_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/top_in_10_mobile_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/top_out_10_mobile_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/incoming_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/incoming_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/outcoming_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/outcoming_time")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/silence_analysis/days_rate")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/silence_analysis/longest_s_days_last_month")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/silence_analysis/longest_s_days")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/silence_analysis/days_rate_last_month")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/incoming_phone_num")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/incoming_phone_call_num")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/incoming_top20_phone_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/outgoing_phone_num")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/outgoing_phone_call_num")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_28_distribution_info/outgoing_top20_phone_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/all_day_in_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/all_day_in_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/all_day_out_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/all_day_out_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/dawn_in_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/dawn_in_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/dawn_out_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/dawn_out_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/day_in_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/day_in_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/day_out_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/day_out_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/night_in_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/night_in_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/night_out_avg")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/night_out_var")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/in_weekend_ratio")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/call_time_series_info/out_weekend_ratio")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/check_register_phone_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/register_phone_nickname_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/check_reserved_phone_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/reserved_phone_nickname_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_idnum_register_phone_match")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_register_reserved_phone_same")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_register_taobao_phone_same")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/plist_info/loan_app_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/plist_info/little_loan_app_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/plist_info/online_shopping_app_number")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/other_info/plist_info/common_social_app_number")).append(STR_FILED_SPLIT_FLAG);
    		
    		sb.append(parseEmergencies());
    		
    		return sb.toString();
    	}
    	
    	private String parseEmergencies() throws IOException, InterruptedException {
    		StringBuffer sb = new StringBuffer();
    		
    		tmpNode = tmpDoc.selectSingleNode("/feature/user_behavior_analysis/call_analysis");
    		if(tmpNode==null){
    			return "";
    		}
    		List<?> nds = tmpNode.selectNodes("./nearly100_emergency_contact_percentage_list/nearly100_emergency_contact_percentage");
    		
    		String[] mobiles = new String[2];
    		Map<String, String> relationMap = new HashMap<String, String>();
    		Map<String, String> near100Map = new HashMap<String, String>();
    		Map<String, String> threemonthMap = new HashMap<String, String>();
    		Map<String, String> callNumberMap = new HashMap<String, String>();
    		Map<String, String> rankNumberMap = new HashMap<String, String>();
    		
    		Element e = null;
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			mobiles[i] = e.element("mobile").getText();
    			relationMap.put(mobiles[i], e.element("relation").getText());
    			near100Map.put(mobiles[i], e.element("percentage").getText());
    		}
    		
    		nds = tmpNode.selectNodes("./three_month_emergency_contact_percentage_list/three_month_emergency_contact_percentage");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			threemonthMap.put(e.element("mobile").getText(), e.element("percentage").getText());
    		}
    		
    		nds = tmpNode.selectNodes("./emergency_contact_call_number_rank_list/emergency_contact_call_number_rank");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			callNumberMap.put(e.element("mobile").getText(), e.element("call_number").getText());
    			rankNumberMap.put(e.element("mobile").getText(), e.element("rank_number").getText());
    		}
    		
    		for(String mobile : mobiles) {
    			sb.append(mobile).append(STR_FILED_SPLIT_FLAG);
    			sb.append(relationMap.get(mobile)).append(STR_FILED_SPLIT_FLAG);
    			sb.append(near100Map.get(mobile)).append(STR_FILED_SPLIT_FLAG);
    			sb.append(threemonthMap.get(mobile)).append(STR_FILED_SPLIT_FLAG);
    			sb.append(callNumberMap.get(mobile)).append(STR_FILED_SPLIT_FLAG);
    			sb.append(rankNumberMap.get(mobile)).append(STR_FILED_SPLIT_FLAG);
    		}
    		
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/nearly100_contact_percentage")).append(STR_FILED_SPLIT_FLAG);
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/three_month_contact_percentage")).append(STR_FILED_SPLIT_FLAG);
    		
    		return sb.toString();
    	}
		
    	private String parseFirstBasic() throws IOException, InterruptedException {
    		StringBuffer sb = new StringBuffer();
    		
    		sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/top_out_10_mobile_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/top_in_10_mobile_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/synthetic_face_threshold")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/synthetic_face_confidence")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_living_city_call_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/six_month_idnum_city_call_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/screen_replay_threshold")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/screen_replay_confidence")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/same_company_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/salary")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/rule_id_by_tongdun")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tongdun/final_score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tongdun/final_decision")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/reserved_phone_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/reserved_phone_call_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/register_phone_call_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_qianhai_risk/qianhai_risk_total")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_qianhai_risk/qianhai_risk_score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/profession")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/position")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location_code")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location_check")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register_location")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_register")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_package_type")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/phone_number_all_need_repay_amount")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_in_use_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/phone_balance")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/outbound_call_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/os_platform")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/plist_info/online_shopping_app_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/night_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/nearly100_incoming_call_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_searched_total_by_idnum")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_searched_90days_by_idnum")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_searched_360days_by_idnum")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_searched_30days_by_idnum")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_searched_180days_by_idnum")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_gray_score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_contacts_class2_blacklist_cnt")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_miguan/miguan_contacts_class1_blacklist_cnt")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/mask_threshold")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/mask_confidence")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/marriage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/macao_call_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/longitude")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/latitude")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/duration")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/amount")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/living_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/plist_info/little_loan_app_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/outcoming_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/outcoming_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/incoming_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/incoming_outcoming_info/incoming_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_number_six_prefix")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/id_number_location")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/id_number_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_5km_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_5km_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_5km_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_5km_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_3km_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_3km_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_3km_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_3km_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_1km_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_1km_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_1km_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/location_relativity_analysis/gps_nearby_1km_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/gender")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/face_replaced")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_confidence")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/emergency_contact_call_number_rank_list/emergency_contact_call_number_rank/rank_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_5")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_4")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/face_plus_plus_thresholds/e_3")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/distance_living_company_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/device_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/day_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/dawn_day_night_call_percentage/dawn_percentage")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_num")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/pass_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/over_due_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/need_repay_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/communication_statistics/contact_lend_request_info/apply_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/plist_info/common_social_app_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_incoming_info/phone_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_incoming_info/call_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/outcoming_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/outcoming_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/incoming_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/collection_phone_call_info/incoming_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_three_day_no_call")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_seven_day_no_call")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_salary")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/check_reserved_phone_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_register_taobao_phone_same")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_register_reserved_phone_same")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/contact_lend_request_relativity/check_register_phone_in_contact_book")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_phone_id_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_name_id_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/check_living_company_city_same")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_living_address_pinpoint")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/check_phone_same/check_idnum_register_phone_match")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_5km_living_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_5km_company_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_3km_living_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_3km_company_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_1km_living_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_cross_validation/check_gps_1km_company_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_fourteen_day_no_call")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_face_plus_plus_alive")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_emergency_contact_not_keep_in_touch")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/check_consecutive_phone_register")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_company_name_address")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_company_address_pinpoint")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_call_120")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/check_call_110")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_third_party_verification/check_bank_four_elements")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/age")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/tag_phone_analysis/n4/avg_total_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/tag_phone_analysis/n4/avg_out_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/tag_phone_analysis/n3/out_cnt")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/user_behavior_analysis/call_analysis/tag_phone_analysis/n3/avg_out_time")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/other_info/plist_info/loan_app_number")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/verify_code")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/hit")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_antifraud/risk_code")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_tianji_xigua/decision_score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_credit_score")).append(STR_FILED_SPLIT_FLAG);
			sb.append(parseThroughXPath("/feature/lend_request_analysis/lend_request_original_info/loan_info/loan_time")).append(STR_FILED_SPLIT_FLAG);
    		
    		return sb.toString();
    	}
    	
    	private void parseTrafficAnalysis(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_TRAFFIC_ANALYSIS);
    		
    		tmpNode = tmpDoc.selectSingleNode("/feature/anti_fraud_analysis/entry_traffic_analysis");
    		if(tmpNode == null)
    			return;
    		
    		StringBuffer sb = new StringBuffer();
    		
    		Element e = null, dimension = null, currentCount = null, threshold = null;
    		
    		List<?> nds = tmpNode.selectNodes("gps_traffic_analysis/item");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			dimension = e.element("dimension_id");
    			currentCount = e.element("current_count");
    			threshold = e.element("threshold");
    			
    			sb.delete(0, sb.length());
    			sb.append(id).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
    			sb.append("GPS").append(STR_FILED_SPLIT_FLAG);
    			sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
    			sb.append(dimension == null ? "" : dimension.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(currentCount == null ? "" : currentCount.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(threshold == null ? "" : threshold.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanKey);
    			
    			this.value.set(sb.toString());
				context.write(this.key, this.value);
    		}
    		
    		nds = tmpNode.selectNodes("age_traffic_analysis/item");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			dimension = e.element("dimension_id");
    			currentCount = e.element("current_count");
    			threshold = e.element("threshold");
    			
    			sb.delete(0, sb.length());
    			sb.append(id).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
    			sb.append("AGE").append(STR_FILED_SPLIT_FLAG);
    			sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
    			sb.append(dimension == null ? "" : dimension.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(currentCount == null ? "" : currentCount.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(threshold == null ? "" : threshold.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanKey);
    			
    			this.value.set(sb.toString());
				context.write(this.key, this.value);
    		}
    		
    		nds = tmpNode.selectNodes("mobile_traffic_analysis/item");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			dimension = e.element("dimension_id");
    			currentCount = e.element("current_count");
    			threshold = e.element("threshold");
    			
    			sb.delete(0, sb.length());
    			sb.append(id).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
    			sb.append("MOBILE").append(STR_FILED_SPLIT_FLAG);
    			sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
    			sb.append(dimension == null ? "" : dimension.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(currentCount == null ? "" : currentCount.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(threshold == null ? "" : threshold.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanKey);
    			
    			this.value.set(sb.toString());
				context.write(this.key, this.value);
    		}
    		
    		nds = tmpNode.selectNodes("idcard_traffic_analysis/item");
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			dimension = e.element("dimension_id");
    			currentCount = e.element("current_count");
    			threshold = e.element("threshold");
    			
    			sb.delete(0, sb.length());
    			sb.append(id).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
    			sb.append("IDCARD").append(STR_FILED_SPLIT_FLAG);
    			sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
    			sb.append(dimension == null ? "" : dimension.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(currentCount == null ? "" : currentCount.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(threshold == null ? "" : threshold.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanKey);
    			
    			this.value.set(sb.toString());
				context.write(this.key, this.value);
    		}
    	}
    	
    	private void parseTagPhoneAnalysis(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_TAG_PHONE_ANALYSIS);
    		
    		StringBuffer sb = new StringBuffer();
    		
    		tmpNode = tmpDoc.selectSingleNode("/feature/user_behavior_analysis/call_analysis/tag_phone_analysis");
    		if(tmpNode == null)
    			return;
    		
    		List<?> nds = tmpNode.selectNodes("./*");
    		Element e = null, outTime = null, avgOutTime = null, outCnt = null, totalCnt = null, inTime = null, avgInTime = null, inCnt = null, totalTime = null, avgTotalTime = null;
    		for(int i = 0; i < nds.size(); i++) {
    			e = (Element) nds.get(i);
    			outTime = e.element("out_time");
    			avgOutTime = e.element("avg_out_time");
    			outCnt = e.element("out_cnt");
    			totalCnt = e.element("total_cnt");
    			inTime = e.element("in_time");
    			avgInTime = e.element("avg_in_time");
    			inCnt = e.element("in_cnt");
    			totalTime = e.element("total_time");
    			avgTotalTime = e.element("avg_total_time");
    			
    			sb.delete(0, sb.length());
    			sb.append(id).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
    			sb.append(e.getName()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(outTime == null ? "" : outTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(avgOutTime == null ? "" : avgOutTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(outCnt == null ? "" : outCnt.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(totalCnt == null ? "" : totalCnt.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(inTime == null ? "" : inTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(avgInTime == null ? "" : avgInTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(inCnt == null ? "" : inCnt.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(totalTime == null ? "" : totalTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(avgTotalTime == null ? "" : avgTotalTime.getText()).append(STR_FILED_SPLIT_FLAG);
    			sb.append(loanKey);
    			
    			this.value.set(sb.toString());
				context.write(this.key, this.value);
    		}
    	}
    	
    	private void parseLoanApp(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_LOAN_APP);
    		
    		StringBuffer sb = new StringBuffer();
			
			tmpNode = tmpDoc.selectSingleNode("/feature/other_info/plist_info/loan_app_list");
			if(tmpNode != null) {
				List<?> nds = tmpNode.selectNodes("loan_app");
				for(int i = 0; i < nds.size(); i++) {
					Element app = (Element) nds.get(i);
					Element appName = app.element("app_name");
					Element packageName = app.element("package_name");
					Element launchTime = app.element("launch_time");
					Element lastUpdateTime = app.element("last_update_time");
					Element appType = app.element("app_type");
					
					sb.delete(0, sb.length());
					sb.append(id).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
					sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
					sb.append(appName == null ? "" : appName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(packageName == null ? "" : packageName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(launchTime == null ? "" : launchTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(lastUpdateTime == null ? "" : lastUpdateTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(appType == null ? "" : appType.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanKey);
					
					this.value.set(sb.toString());
					context.write(this.key, this.value);
				}
			}
    	}
    	
    	private void parseOneMonthCallInfo(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_ONE_MONTH_CALL_INFO);
    		
    		StringBuffer sb = new StringBuffer();
			
			tmpNode = tmpDoc.selectSingleNode("/feature/user_behavior_analysis/call_analysis/one_month_loan_app_customer_phone_call_info_list");
			if(tmpNode != null) {
				List<?> nds = tmpNode.selectNodes("loan_app_customer_phone_call_info");
				for(int i = 0; i < nds.size(); i++) {
					Element e = (Element) nds.get(i);
					Element appName = e.element("app_name");
					Element packageName = e.element("package_name");
					Element incomingCount = e.element("incoming_number");
					Element incomingTime = e.element("incoming_time");
					Element outcomingCount = e.element("incoming_time");
					Element outcomingTime = e.element("outcoming_time");
					
					sb.delete(0, sb.length());
					sb.append(id).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
					sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
					sb.append(appName == null ? "" : appName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(packageName == null ? "" : packageName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(incomingCount == null ? "" : incomingCount.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(incomingTime == null ? "" : incomingTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(outcomingCount == null ? "" : outcomingCount.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(outcomingTime == null ? "" : outcomingTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanKey);
					
					this.value.set(sb.toString());
					context.write(this.key, this.value);
				}
			}
    	}
    	
    	private void parseThreeMonthCallInfo(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_THREE_MONTH_CALL_INFO);
    		
    		StringBuffer sb = new StringBuffer();
			
			tmpNode = tmpDoc.selectSingleNode("/feature/user_behavior_analysis/call_analysis/three_month_loan_app_customer_phone_call_info_list");
			if(tmpNode != null) {
				List<?> nds = tmpNode.selectNodes("loan_app_customer_phone_call_info");
				for(int i = 0; i < nds.size(); i++) {
					Element e = (Element) nds.get(i);
					Element appName = e.element("app_name");
					Element packageName = e.element("package_name");
					Element incomingCount = e.element("incoming_number");
					Element incomingTime = e.element("incoming_time");
					Element outcomingCount = e.element("incoming_time");
					Element outcomingTime = e.element("outcoming_time");
					
					sb.delete(0, sb.length());
					sb.append(id).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
					sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
					sb.append(appName == null ? "" : appName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(packageName == null ? "" : packageName.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(incomingCount == null ? "" : incomingCount.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(incomingTime == null ? "" : incomingTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(outcomingCount == null ? "" : outcomingCount.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(outcomingTime == null ? "" : outcomingTime.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanKey);
					
					this.value.set(sb.toString());
					context.write(this.key, this.value);
				}
			}
    	}
    	
    	private void parseAntiFraudModels(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_ANTI_FRAUD_MODELS);
    		
    		StringBuffer sb = new StringBuffer();
			
			tmpNode = tmpDoc.selectSingleNode("/feature/anti_fraud_analysis");
			if(tmpNode == null)
				return;
			
			List<?> nds = tmpNode.selectNodes("./*");
			for(int i = 0; i < nds.size(); i++) {
				Element e = (Element) nds.get(i);
				if(!e.getName().toLowerCase().startsWith("model"))
					continue;
				
				sb.delete(0, sb.length());
				sb.append(id).append(STR_FILED_SPLIT_FLAG);
//				sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
				sb.append(e.getName()).append(STR_FILED_SPLIT_FLAG);
				sb.append(parseThroughXPath(e.getPath() + "/is_success")).append(STR_FILED_SPLIT_FLAG);
				sb.append(parseThroughXPath(e.getPath() + "/result/model_id")).append(STR_FILED_SPLIT_FLAG);
				sb.append(parseThroughXPath(e.getPath() + "/result/loan_id")).append(STR_FILED_SPLIT_FLAG);
				sb.append(parseThroughXPath(e.getPath() + "/result/prob")).append(STR_FILED_SPLIT_FLAG);
				sb.append(parseThroughXPath(e.getPath() + "/result/model_feature")).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanKey);
				
				this.value.set(sb.toString());
				context.write(this.key, this.value);
			}
    	}
    	
    	private void parseRegisterPhoneList(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_REGISTER_PHONE_LIST);
    		
    		StringBuffer sb = new StringBuffer();
    		
    		tmpNode = tmpDoc.selectSingleNode("/feature/historial_relativity_analysis/id_number_phone_number_history_statistics/register_phone_repay_info_list");
			if(tmpNode == null)
				return;
			
			List<?> nds = tmpNode.selectNodes("./register_phone_repay_info");
			Element e = null, principal = null, interest = null, mgmtFee = null, loanTime = null, dueDate = null, payoffTime = null, payLaunchType = null;
			for(int i = 0; i < nds.size(); i++) {
				e = (Element) nds.get(i);
				principal = e.element("principal");
				interest = e.element("interest");
				mgmtFee = e.element("mgmt_fee");
				loanTime = e.element("loan_time");
				dueDate = e.element("due_date");
				payoffTime = e.element("payoff_time");
				payLaunchType = e.element("pay_launch_type");
				
				sb.delete(0, sb.length());
				sb.append(id).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
				sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
				sb.append(principal == null ? "" : principal.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(interest == null ? "" : interest.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(mgmtFee == null ? "" : mgmtFee.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanTime == null ? "" : loanTime.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(dueDate == null ? "" : dueDate.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(payoffTime == null ? "" : payoffTime.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(payLaunchType == null ? "" : payLaunchType.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanKey);
				
				this.value.set(sb.toString());
				context.write(this.key, this.value);
			}
    	}
    	
    	private void parseZhimaCredit(Context context, String id, String loanId, String loanKey) throws IOException, InterruptedException {
    		this.key.set(STR_TARGET_POS_ZHIMA_CREDIT);
    		
    		StringBuffer sb = new StringBuffer();
    		
    		tmpNode = tmpDoc.selectSingleNode("/feature/historial_relativity_analysis/check_black_list/result_by_zhima_credit_watch/zhima_credit_watch_detail_list");
			if(tmpNode == null)
				return;
			
			List<?> nds = tmpNode.selectNodes("./zhima_credit_watch_detail"), extendNodes = null;
			Element e = null, bizCode = null, level = null, type = null, code = null, refreshTime = null, status = null, statement = null, settlement = null, extendNode = null, key = null, value = null, desc = null;
			String tmpDt = null;
			for(int i = 0; i < nds.size(); i++) {
				e = (Element) nds.get(i);
				bizCode = e.element("biz_code");
				level = e.element("level");
				type = e.element("type");
				code = e.element("code");
				refreshTime = e.element("refresh_time");
				status = e.element("status");
				statement = e.element("statement");
				settlement = e.element("settlement");
				
				extendNodes = e.selectNodes("./entend_info_list/extend_info");
				for(int j = 0; j < extendNodes.size(); j++) {
					this.key.set(STR_TARGET_POS_ZHIMA_CREDIT_EXTEND);
					
					extendNode = (Element) extendNodes.get(j);
					key = extendNode.element("key");
					value = extendNode.element("value");
					desc = extendNode.element("description");
					
					sb.delete(0, sb.length());
					sb.append(id).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
					sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
					sb.append(key == null ? "" : key.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(value == null ? "" : value.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(desc == null ? "" : desc.getText()).append(STR_FILED_SPLIT_FLAG);
					sb.append(loanKey);
					
					this.value.set(sb.toString());
					context.write(this.key, this.value);
				}
				
				
				this.key.set(STR_TARGET_POS_ZHIMA_CREDIT);
				
				sb.delete(0, sb.length());
				sb.append(id).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanId).append(STR_FILED_SPLIT_FLAG);
				sb.append(i + 1).append(STR_FILED_SPLIT_FLAG);
				sb.append(bizCode == null ? "" : bizCode.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(level == null ? "" : level.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(type == null ? "" : type.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(code == null ? "" : code.getText()).append(STR_FILED_SPLIT_FLAG);
				tmpDt = refreshTime.getText();
				if(tmpDt != null) {
					tmpDt = dateFormatter.format(new Date(Long.valueOf(tmpDt)));
				}
				sb.append(tmpDt == null ? "" : tmpDt).append(STR_FILED_SPLIT_FLAG);
				sb.append(status == null ? "" : status.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(statement == null ? "" : statement.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(settlement == null ? "" : settlement.getText()).append(STR_FILED_SPLIT_FLAG);
				sb.append(loanKey);
				
				this.value.set(sb.toString());
				context.write(this.key, this.value);
			}
    	}
    	
		private String parseThroughXPath(String xpath) {
			tmpNode = tmpDoc.selectSingleNode(xpath);
			return tmpNode == null ? "" : tmpNode.getStringValue();
		}
	}
	
	public static class AnalysisReportReducer extends Reducer<Text, Text, Text, Text> {
		private NullWritable nullkey = NullWritable.get();
		private MultipleOutputs<Text, Text> mos = null;
		
		protected void setup(Context context) throws IOException, InterruptedException {
		    mos = new MultipleOutputs<Text, Text>(context);
		}
	
		protected void cleanup(Context context) throws IOException, InterruptedException {
		    mos.close();
		}
		
		public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
			String keyStr = null;
			
			for(Text t : values) {
				keyStr = key.toString();
				if(STR_TARGET_POS_BASIC_FIRST.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_BASIC_FIRST, nullkey, t);
				} else if(STR_TARGET_POS_BASIC_RENEWAL.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_BASIC_RENEWAL, nullkey, t);
				} else if(STR_TARGET_POS_TRAFFIC_ANALYSIS.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_TRAFFIC_ANALYSIS, nullkey, t);
				} else if(STR_TARGET_POS_TAG_PHONE_ANALYSIS.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_TAG_PHONE_ANALYSIS, nullkey, t);
				} else if(STR_TARGET_POS_LOAN_APP.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_LOAN_APP, nullkey, t);
				} else if(STR_TARGET_POS_ANTI_FRAUD_MODELS.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_ANTI_FRAUD_MODELS, nullkey, t);
				} else if(STR_TARGET_POS_ONE_MONTH_CALL_INFO.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_ONE_MONTH_CALL_INFO, nullkey, t);
				} else if(STR_TARGET_POS_THREE_MONTH_CALL_INFO.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_THREE_MONTH_CALL_INFO, nullkey, t);
				} else if(STR_TARGET_POS_REGISTER_PHONE_LIST.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_REGISTER_PHONE_LIST, nullkey, t);
				} else if(STR_TARGET_POS_ZHIMA_CREDIT.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_ZHIMA_CREDIT, nullkey, t);
				} else if(STR_TARGET_POS_ZHIMA_CREDIT_EXTEND.equals(keyStr)) {
					this.mos.write(STR_TARGET_POS_ZHIMA_CREDIT_EXTEND, nullkey, t);
				}
			}
		}
	}
	
	@Override
	public int run(String[] args) throws Exception {
		// TODO Auto-generated method stub
		Configuration conf = getConf();
		Job job = Job.getInstance(conf);
		
		System.setProperty("HADOOP_USER_NAME", "hdfs");
		String dt = conf.get("etl.param.dt", "2017-07-27");
		String inputDir = "/data/bdm/pdl02_verify_analysis_report_inc/dt=" + dt;
		String outputDir = conf.get("etl.param.output", "/tmp/fdm/verifyanalysisreport");
		if (dt.equals("")) {
			log.info("请输入日期：etl.param.dt");
			return -1;
		}
		if (outputDir.equals("")) {
			log.info("请输入输出路径：etl.param.output");
			return -1;
		}
		
		log.info("输入路径:" + inputDir);
		log.info("输出路径:" + outputDir);
		
		HadoopUtils.delete(conf, new Path(outputDir));
		
		job.setJarByClass(this.getClass());
		
		job.setOutputKeyClass(Text.class);
		job.setOutputValueClass(Text.class);
		
		job.setMapperClass(AnalysisReportMapper.class);
		job.setReducerClass(AnalysisReportReducer.class);
		
		job.setInputFormatClass(TextInputFormat.class);
		job.setOutputFormatClass(TextOutputFormat.class);
		
		FileInputFormat.setInputPaths(job, new Path(inputDir));
		FileOutputFormat.setOutputPath(job, new Path(outputDir));
		
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_BASIC_RENEWAL, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_BASIC_FIRST, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_TRAFFIC_ANALYSIS, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_TAG_PHONE_ANALYSIS, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_LOAN_APP, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_ANTI_FRAUD_MODELS, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_ONE_MONTH_CALL_INFO, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_THREE_MONTH_CALL_INFO, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_REGISTER_PHONE_LIST, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_ZHIMA_CREDIT, TextOutputFormat.class, Text.class, Text.class);
		MultipleOutputs.addNamedOutput(job, STR_TARGET_POS_ZHIMA_CREDIT_EXTEND, TextOutputFormat.class, Text.class, Text.class);
		
		return job.waitForCompletion(true) ? 0 : 1;
	}
	
	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		System.exit(ToolRunner.run(new VerifyAnalysisReportXMLParser(), args));
	}
}
